#include "echo.h"
#include <muduo/base/Logging.h>
#include <muduo/net/EventLoop.h>

int 
main(int argc, char **argv) {
	LOG_INFO << "pid = " << getpid();
	muduo::net::EventLoop loop;
	muduo::net::InetAddress listenAddr(2007);
	int maxConnections = 3;
	if (argc > 1)
		maxConnections = atoi(argv[1]);

	LOG_INFO << "maxConnections = " << maxConnections;
	EchoServer server(&loop, listenAddr, maxConnections);
	server.Start();
	loop.loop();
	return 0;
}
